package com.tiantianyuegou.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

/**
 * Created by Administrator on 2016/2/1.
 * 评价适配器
 */
public class MyEvaluateAdapter extends BaseAdapter {
    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        return null;
    }


    /*private Context mContext;
    private List<PingjiaModel> mData;

    public MyEvaluateAdapter(Context context) {
        mContext = context;
        mData = new ArrayList<>();
    }

    public void setData(List<PingjiaModel> data) {
        mData.clear();
        mData.addAll(data);
    }

    public List<PingjiaModel> getData() {
        return mData;
    }

    @Override
    public int getCount() {
        return mData.size();
    }

    @Override
    public Object getItem(int position) {
        return mData.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

//    @Override
//    public View getView(final int position, View convertView, ViewGroup parent) {
       *//* final HolderView holder = new HolderView();
//        if (convertView == null) {
        convertView = LayoutInflater.from(mContext).inflate(R.layout.item_my_evaluate, parent, false);
//            holder = new HolderView();
        holder.edit_pingjia = (EditText) convertView.findViewById(R.id.edit_pingjia);
        holder.img_good = (ImageView) convertView.findViewById(R.id.radio_haoping);
        holder.img_bad = (ImageView) convertView.findViewById(R.id.radio_chaping);
        holder.img_middle = (ImageView) convertView.findViewById(R.id.radio_zhongping);
        holder.img_goods_picture = (ImageView) convertView.findViewById(R.id.img_goods_picture);
        holder.text_goods_info = (TextView) convertView.findViewById(R.id.text_goods_info);
        holder.text_goods_name = (TextView) convertView.findViewById(R.id.text_goods_name);
        holder.text_goods_money = (TextView) convertView.findViewById(R.id.text_goods_money);
        holder.text_goods_num = (TextView) convertView.findViewById(R.id.text_goods_num);
        convertView.setTag(holder);*//*
//        } else {
//            holder = (HolderView) convertView.getTag();
//        }
//        PingjiaModel model = mData.get(position);
//        String pic=model.getPic();
//        if(pic.contains(",")){
////            ImageLoader.getInstance().displayImage(pic.substring(0, pic.indexOf(",")),holder.img_goods_picture);
//        }else{
////            ImageLoader.getInstance().displayImage(model.getPic(), holder.img_goods_picture);
//        }

       *//* holder.text_goods_name.setText(model.getName());
        holder.text_goods_money.setText(model.getPrice());
        holder.text_goods_info.setText(model.getSpec());
        holder.text_goods_num.setText(model.getCount());
        if (model.getEvaluateLevel() != null && !"".equals(model.getEvaluateLevel())) {
            if ("3".equals(model.getEvaluateLevel())) {
                holder.img_good.setImageResource(R.mipmap.evaluate_true);
                holder.img_middle.setImageResource(R.mipmap.evaluate_false);
                holder.img_bad.setImageResource(R.mipmap.evaluate_false);
            } else if ("2".equals(model.getEvaluateLevel())) {
                holder.img_middle.setImageResource(R.mipmap.evaluate_true);
                holder.img_good.setImageResource(R.mipmap.evaluate_false);
                holder.img_bad.setImageResource(R.mipmap.evaluate_false);
            } else if ("1".equals(model.getEvaluateLevel())) {
                holder.img_bad.setImageResource(R.mipmap.evaluate_true);
                holder.img_good.setImageResource(R.mipmap.evaluate_false);
                holder.img_middle.setImageResource(R.mipmap.evaluate_false);
            }
        }

        holder.img_good.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mData.get(position).setEvaluateLevel("3");
                holder.img_good.setImageResource(R.mipmap.evaluate_true);
                holder.img_middle.setImageResource(R.mipmap.evaluate_false);
                holder.img_bad.setImageResource(R.mipmap.evaluate_false);
            }
        });

        holder.img_middle.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mData.get(position).setEvaluateLevel("2");
                holder.img_middle.setImageResource(R.mipmap.evaluate_true);
                holder.img_good.setImageResource(R.mipmap.evaluate_false);
                holder.img_bad.setImageResource(R.mipmap.evaluate_false);
            }
        });

        holder.img_bad.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mData.get(position).setEvaluateLevel("1");
                holder.img_bad.setImageResource(R.mipmap.evaluate_true);
                holder.img_good.setImageResource(R.mipmap.evaluate_false);
                holder.img_middle.setImageResource(R.mipmap.evaluate_false);
            }
        });

        holder.edit_pingjia.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                EditText editText = (EditText) v.findViewById(R.id.edit_pingjia);
                mData.get(position).setEvaluateContent(editText.getText().toString());
            }
        });

        holder.edit_pingjia.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            @Override
            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                if (actionId == EditorInfo.IME_ACTION_DONE) {
                    mData.get(position).setEvaluateContent(v.getText().toString());
                }
                return false;
            }
        });
        return convertView;
    }
*//*

  *//*  class HolderView {
        EditText edit_pingjia;

        ImageView img_goods_picture, img_good, img_middle, img_bad;
        TextView text_goods_name, text_goods_info, text_goods_money, text_goods_num;


    }*//*
//}

    }   */
}